package com.atguigu.gmall.search.repo;

import com.atguigu.gmall.search.entity.Person;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

//CrudRepository<Person,Long> 操作的是那个类，类的Id是什么属性
//项目启动自动创建索引
@Repository
public interface PersonRepository extends CrudRepository<Person,Long> {

    List<Person> findAllByAgeGreaterThanEqual(Long age);
}
